﻿<!--#include file="Template.asp"-->
<%
if request("send")="ok" then
	Username=Checkstr(trim(request.form("UserName")))
	UserInfo=Checkstr(trim(request.form("UserInfo")))
	Comments=Checkstr(trim(request.form("Comments")))
if Username="" or Comments="" then
	Call WriteErrMsg("填写资料不完整，请检查后重新输入！")
End if
if len(Comments)>400 then
	Call WriteErrMsg("留言内容太长了，请不要超过"&maxlength&"个字符！")
End if
	set rs=Server.CreateObject("ADODB.RecordSet")
	sql="select top 1 * from [Easyes_GuestBook]"
	rs.open sql,conn,1,3
			rs.Addnew
			rs("Username")=Username
			rs("UserInfo")=UserInfo
			rs("Comments")=Comments
			rs("IP")=Request.serverVariables("REMOTE_ADDR")
			rs.Update
		rs.close
		set rs=nothing
	Response.write "<script language='javascript'>"
	Response.write "alert('你已成功提交留言，等待管理员回复后即可显示！点击确认关闭窗口。');"
	Response.write "window.close();"
	Response.write "</script>"
	Response.End
End if
%><html>
<head>
<title>留言反馈</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
BODY { SCROLLBAR-HIGHLIGHT-COLOR: buttonface;SCROLLBAR-SHADOW-COLOR: buttonface;SCROLLBAR-3DLIGHT-COLOR: buttonhighlight; SCROLLBAR-TRACK-COLOR: #eeeeee; SCROLLBAR-DARKSHADOW-COLOR: buttonshadow; background-color:buttonface;margin: 3px; padding: 0px; border: none;}
form{margin:0px;padding:0px;}
BUTTON {width:5em}
TABLE  {font-family:宋体; font-size:9pt}
/*表单输入框开始*/
/* ----------------------------- */
.input_button {font-size: 12px;}
.input_text{font-size: 12px; background-color: #F7FFFF;color:#808080;padding:4px;}
-->
</style>
</head>
<body>
<iframe src="" name="hiddeniframe" width="0" height="0"></iframe>
<form name="form1" method="post" action="<%=SiteUrl%>/ESYSPassport/GuestWrite.asp?send=ok" Target="hiddeniframe">
<table cellSpacing="0" cellPadding="4" width="100%" border="0">
<tr><td align=right>我们姓名：</td><td ><input onFocus="this.value=''" type=text name="UserName" size="14" maxlength=16 class="input_text" style="width: 186px" value="匿名"> <b><font color="#FF0000">*</font></b></td></tr>
<tr><td align=right>我的信息：</td><td><textarea onFocus="this.value=''" name="UserInfo" class="input_text" style="height: 46px; width: 350px;" cols="20">电话或其他联系方式</textarea></td></tr>
<tr><td align=right>留言内容：</td><td><textarea name="Comments" class="input_text" style="height: 105px; width: 350px;"></textarea> <b><font color="#FF0000">*</font></b></td></tr>
<tr><td></td><td><input type="submit" value="提交留言" name="Submit" class="input_button"> <input type="reset" value="重新填写" name="Submit2" class="input_button"></td></tr>
</table>
</form>
</body>
</html>